package com.hangyutech.strelitzia.modules.controller;

import com.hangyutech.strelitzia.modules.entity.Settings;
import com.hangyutech.strelitzia.modules.service.SettingsService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 系统设置表(Settings)表控制层
 *
 * @author makejava
 * @since 2020-12-13 06:58:40
 */
@RestController
@RequestMapping("settings")
@CrossOrigin
@Api(description = "设置")
public class SettingsController {
    /**
     * 服务对象
     */
    @Resource
    private SettingsService settingsService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Settings selectOne(Integer id) {
        return this.settingsService.queryById(id);
    }

}